#include <cmath>
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <map>
#include <set>
#include <cstring>
#define endl "\n"
using namespace std;
char ch[110][110];
int sh[110][110];
int N,n,m,k;
int x1,x2;
int yy;
int y2;
int fx[4][2]={1,0,-1,0,0,1,0,-1};
struct eo
{
    int x,y;
};
void bfs(int x,int y)
{
    queue<eo>q;
    memset(sh,-1,sizeof(sh));
    q.push({x,y});
    while(!q.empty())
    {
        eo p;
        p=q.front();
        q.pop();
        for(int i=0;i<4;i++)
        {
           int xx=p.x+fx[i][0];
           int yy=p.y+fx[i][1];
           while(xx>0&&xx<=n&&yy>0&&yy<=m&&ch[xx][yy]!='*')
           {
               if(sh[xx][yy]==-1)
               {
                   sh[xx][yy]=sh[p.x][p.y]+1;
                   q.push({xx,yy});
                   if(xx==x2&&yy==y2)
                    return ;
               }
               xx+=fx[i][0];
               yy+=fx[i][1];
           }
        }
    }
    return ;
}
int main()
{
    //int t;
    cin>>N;
    while(N--)
    {
        cin>>n>>m;
        for(int i=1;i<=n;i++)
        {
            for(int j=1;j<=m;j++)
            {
                cin>>ch[i][j];
            }
        }
        cin>>k>>yy>>x1>>y2>>x2;
        if(x1==x2&&yy==y2)
        {
            cout<<"yes"<<endl;
            continue;
        }
        bfs(x1,yy);
        if(sh[x2][y2]!=-1&&sh[x2][y2]<=k)
        {
                cout<<"yes"<<endl;
        }
        else
            cout<<"no"<<endl;
    }
    return 0;
}
